add Dockerfile for building windows image#155
Conversation
| EXPOSE 80 443 | ||
| WORKDIR "C:\Program Files\nginx" | ||
| CMD Start-Process -NoNewWindow -FilePath nginx.exe ; \ | ||
| Add-Content logs\access.log 'nginx started...' ; Get-Content -Wait logs\access.log |
There was a problem hiding this comment.
This is basically tail -f -- can't we run nginx the same way in Windows that we do in Linux to get it to stay in the foreground and log to stdout/stderr?
There was a problem hiding this comment.
@tianon I googled hard, but I don't think there's an elegant way to symlink the logfiles to stdout/err devices on Windows (they just don't exist).
I agree that this solution is super lame. The only reason it would be acceptable is because nginx on Windows is experimental in the first place.
| @@ -0,0 +1,16 @@ | |||
| FROM microsoft/windowsservercore | |||
There was a problem hiding this comment.
Can we run nginx.exe in nanoserver?
There was a problem hiding this comment.
@StefanScherer It doesn't work currently, I tried. I'm guessing it uses 32bit APIs and relies on WoW. Someone should try to compile with 64-bit only toolchain for nanoserver.
There was a problem hiding this comment.
ok, would be great for future versions of nginx.
|
I just had a look at http://nginx.org/en/docs/windows.html
|
|
Given that the facts outlined in http://nginx.org/en/docs/windows.html#known_issues still stand, I don't really get the idea of publishing it on docker. And yes, mainline version should be used, not the stable one. |
Opening this for discussion.
cc @tianon @StefanScherer